package com.dbh.company.buildbook;

import cn.hutool.core.io.FileUtil;
import cn.hutool.json.JSONUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * @author dongbanghui
 * @create 2023/11/23
 */
public class NoiseRoadJson {
    public static void main(String[] args) {
        List<String> strings = FileUtil.readLines("D:\\data\\work\\file\\楼书\\楼书1.0\\噪音\\路网\\华贸城.txt", "UTF-8");
        List<String> list = new ArrayList<>();
        strings.forEach(item -> {
            String[] split = item.split("-");
            String str1 = split[0];
            String str2 = split[1];
            String[] split1 = str1.split(",");
            String[] split2 = str2.split(",");
            String s = split1[1] + "," + split1[0] + ";" + split2[1] + "," + split2[0];
            list.add(s);
        });
        System.out.println(JSONUtil.toJsonStr(list));



    }


}
